package com.zimmur.solr.model;

import java.util.ArrayList;
import java.util.List;

import org.apache.solr.client.solrj.beans.Field;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zimmur.model.account.GoodsUser;
import com.zimmur.model.goods.GoodsImage;

public class Goods implements SearchableGoods{

	@Field(ID_FIELD)
	private String goodsId;
	@Field(TITLE_FIELD)
	private String title;
	@Field(TYPEFLAG_FIELD)
	private Integer typeFlag;
	@Field(NICKNAME_FIELD)
	private String nickName;
	@Field(GOODCOLORNAME_FIELD)
	private String goodColorName;
	@Field(GOODSIZECODE_FIELD)
	private String goodSizeCode;
	@Field(SALENUM_FIELD)
	private Integer saleNum;
	@JsonIgnore
	@Field(CREATEDATE_FIELD)
	private Integer createDate;
	@Field(PUBLISHDATE_FIELD)
	private Integer publishDate;
	@Field(PRICE_FIELD)
	private Double price;
	@Field(TYPEID_FIELD)
	private Integer typeId;
	@JsonIgnore
	@Field(CONTENT_FIELD)
	private String content;
	@Field(SMALLDESC_FIELD)
	private String smallDesc;
	@Field(SHARENUM_FIELD)
	private Integer shareNum;
	@Field(USERID_FIELD)
	private Long userId;
	@Field(COVERIMAGE_FIELD)
	private String coverImage;
	@Field(COVERIMAGEURL_FIELD)
	private String coverImageUrl;
	@Field(TAGS_FIELD)
	private String tags;
	@Field(STYLECODE_FIELD)
	private String styleCode;
	@Field(STATUS_FIELD)
	private String status;
	@JsonIgnore
	@Field(DISPLAYSTATUS_FIELD)
	private Integer displayStatus;
	@Field(BROWERNUM_FIELD)
	private Integer browerNum;
	@Field(STANDARDPRICE_FIELD)
	private Double standardPrice;
	@JsonIgnore
	@Field(IORDERNUM_FIELD)
	private Integer iOrderNum;
	@JsonIgnore
	@Field(RECOMMANDTYPE_FIELD)
	private Integer recommandType;
	@Field(OFFPERCENT_FIELD)
	private Integer offPercent;
	@Field(INVENTORYNUM_FIELD)
	private Integer inventoryNum;
	@Field(MATERIAL_FIELD)
	private String material;
	 /**
     * 是否预售 0=否 1=是
     */
	@Field(ISPREPAY_FIELD)
    private Integer isPrepay;
    /**
     * 预售价格
     */
	@Field(PREPAYPRICE_FIELD)
    private Double prepayPrice;
	@Field(MAINCOLOR_FIELD)
	private String mainColor;
    
	public String getMainColor() {
		return mainColor;
	}
	public void setMainColor(String mainColor) {
		this.mainColor = mainColor;
	}
	private Integer isWish = 0;//是否愿望单：0=不是，1=是
	private GoodsUser user;

   private List<GoodsImage> goodsImages = new ArrayList<>();
	public String getGoodsId() {
		return goodsId;
	}
	public void setGoodsId(String goodsId) {
		this.goodsId = goodsId;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Integer getTypeFlag() {
		return typeFlag;
	}
	public void setTypeFlag(Integer typeFlag) {
		this.typeFlag = typeFlag;
	}
	public String getNickName() {
		return nickName;
	}
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	public Integer getSaleNum() {
		return saleNum;
	}
	public void setSaleNum(Integer saleNum) {
		this.saleNum = saleNum;
	}
	public Integer getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Integer createDate) {
		this.createDate = createDate;
	}
	public Integer getPublishDate() {
		return publishDate;
	}
	public void setPublishDate(Integer publishDate) {
		this.publishDate = publishDate;
	}
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	
	public Integer getTypeId() {
		return typeId;
	}
	public void setTypeId(Integer typeId) {
		this.typeId = typeId;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Integer getBrowerNum() {
		return browerNum;
	}
	public void setBrowerNum(Integer browerNum) {
		this.browerNum = browerNum;
	}
	public String getSmallDesc() {
		return smallDesc;
	}
	public void setSmallDesc(String smallDesc) {
		this.smallDesc = smallDesc;
	}
	public Integer getShareNum() {
		return shareNum;
	}
	public void setShareNum(Integer shareNum) {
		this.shareNum = shareNum;
	}
	public Long getUserId() {
		return userId;
	}
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	public String getCoverImage() {
		return coverImage;
	}
	public void setCoverImage(String coverImage) {
		this.coverImage = coverImage;
	}
	public String getTags() {
		return tags;
	}
	public void setTags(String tags) {
		this.tags = tags;
	}
	public String getStyleCode() {
		return styleCode;
	}
	public void setStyleCode(String styleCode) {
		this.styleCode = styleCode;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public Integer getDisplayStatus() {
		return displayStatus;
	}
	public void setDisplayStatus(Integer displayStatus) {
		this.displayStatus = displayStatus;
	}
	public Double getStandardPrice() {
		return standardPrice;
	}
	public void setStandardPrice(Double standardPrice) {
		this.standardPrice = standardPrice;
	}
	public Integer getiOrderNum() {
		return iOrderNum;
	}
	public void setiOrderNum(Integer iOrderNum) {
		this.iOrderNum = iOrderNum;
	}
	public Integer getRecommandType() {
		return recommandType;
	}
	public void setRecommandType(Integer recommandType) {
		this.recommandType = recommandType;
	}
	
	public Integer getOffPercent() {
		return offPercent;
	}
	public void setOffPercent(Integer offPercent) {
		this.offPercent = offPercent;
	}
	public Integer getInventoryNum() {
		return inventoryNum;
	}
	public void setInventoryNum(Integer inventoryNum) {
		this.inventoryNum = inventoryNum;
	}
	
	public GoodsUser getUser() {
		return user;
	}
	public void setUser(GoodsUser user) {
		this.user = user;
	}
	public List<GoodsImage> getGoodsImages() {
		return goodsImages;
	}
	public void setGoodsImages(List<GoodsImage> goodsImages) {
		this.goodsImages = goodsImages;
	}
	
	public String getGoodColorName() {
		return goodColorName;
	}
	public void setGoodColorName(String goodColorName) {
		this.goodColorName = goodColorName;
	}
	public String getGoodSizeCode() {
		return goodSizeCode;
	}
	public void setGoodSizeCode(String goodSizeCode) {
		this.goodSizeCode = goodSizeCode;
	}
	public String getMaterial() {
		return material;
	}
	public void setMaterial(String material) {
		this.material = material;
	}
	
	
	public String getCoverImageUrl() {
		return coverImageUrl;
	}
	public void setCoverImageUrl(String coverImageUrl) {
		this.coverImageUrl = coverImageUrl;
	}
	public Integer getIsWish() {
		return isWish;
	}
	public void setIsWish(Integer isWish) {
		this.isWish = isWish;
	}
	
	public Integer getIsPrepay() {
		return isPrepay;
	}
	public void setIsPrepay(Integer isPrepay) {
		this.isPrepay = isPrepay;
	}
	public Double getPrepayPrice() {
		return prepayPrice;
	}
	public void setPrepayPrice(Double prepayPrice) {
		this.prepayPrice = prepayPrice;
	}
	@Override
	public String toString() {
		return "Goods [goodsId=" + goodsId + ", title=" + title + ", typeFlag=" + typeFlag + ", nickName=" + nickName
				+ ", goodColorName=" + goodColorName + ", goodSizeCode=" + goodSizeCode + ", saleNum=" + saleNum
				+ ", createDate=" + createDate + ", publishDate=" + publishDate + ", price=" + price + ", typeId="
				+ typeId + ", content=" + content + ", smallDesc=" + smallDesc + ", shareNum=" + shareNum + ", userId="
				+ userId + ", coverImage=" + coverImage + ", tags=" + tags + ", styleCode=" + styleCode + ", status="
				+ status + ", displayStatus=" + displayStatus + ", browerNum=" + browerNum + ", standardPrice="
				+ standardPrice + ", iOrderNum=" + iOrderNum + ", recommandType=" + recommandType + ", offPercent="
				+ offPercent + ", inventoryNum=" + inventoryNum + ", material=" + material + ", user=" + user
				+ ", goodsImages=" + goodsImages + "]";
	}
	
}
